home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / share / maxima / 5.9.0 / src / numerical / slatec / dbesj0.lisp < prev    next >
Encoding:
Text File  |  2003-02-09  |  2.9 KB  |  67 lines

  1. ;;; Compiled by f2cl version 2.0 beta 2002-05-06
  2. ;;; 
  3. ;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
  4. ;;;           (:coerce-assigns :as-needed) (:array-type ':simple-array)
  5. ;;;           (:array-slicing nil) (:declare-common nil)
  6. ;;;           (:float-format double-float))
  7.  
  8. (in-package "SLATEC")
  9.  
  10.  
  11. (let ((ntj0 0)
  12.       (xsml 0.0)
  13.       (bj0cs (make-array 19 :element-type 'double-float))
  14.       (first nil))
  15.   (declare (type f2cl-lib:logical first)
  16.            (type (simple-array double-float (19)) bj0cs)
  17.            (type double-float xsml)
  18.            (type f2cl-lib:integer4 ntj0))
  19.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (1) ((1 19))) 0.10025416196893913)
  20.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (2) ((1 19))) -0.6652230077644051)
  21.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (3) ((1 19))) 0.2489837034982813)
  22.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (4) ((1 19))) -0.03325272317003577)
  23.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (5) ((1 19))) 0.0023114179304694017)
  24.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (6) ((1 19))) -9.911277419950809e-5)
  25.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (7) ((1 19))) 2.8916708643998806e-6)
  26.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (8) ((1 19))) -6.121085866303262e-8)
  27.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (9) ((1 19))) 9.838650793856785e-10)
  28.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (10) ((1 19))) -1.2423551597301767e-11)
  29.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (11) ((1 19))) 1.2654336302559047e-13)
  30.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (12) ((1 19))) -1.0619456495287243e-15)
  31.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (13) ((1 19))) 7.470621075802458e-18)
  32.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (14) ((1 19))) -4.4697032274412785e-20)
  33.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (15) ((1 19))) 2.3024281584337433e-22)
  34.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (16) ((1 19))) -1.0319144794166697e-24)
  35.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (17) ((1 19))) 4.0608178274873336e-27)
  36.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (18) ((1 19))) -1.4143836005240915e-29)
  37.   (f2cl-lib:fset (f2cl-lib:fref bj0cs (19) ((1 19))) 4.391090549669889e-32)
  38.   (setq first f2cl-lib:%true%)
  39.   (defun dbesj0 (x)
  40.     (declare (type double-float x))
  41.     (prog ((ampl 0.0) (theta 0.0) (y 0.0) (dbesj0 0.0))
  42.       (declare (type double-float dbesj0 y theta ampl))
  43.       (cond
  44.        (first
  45.         (setf ntj0
  46.                 (initds bj0cs 19
  47.                  (* 0.1f0 (f2cl-lib:freal (f2cl-lib:d1mach 3)))))
  48.         (setf xsml (f2cl-lib:fsqrt (* 8.0 (f2cl-lib:d1mach 3))))))
  49.       (setf first f2cl-lib:%false%)
  50.       (setf y (coerce (abs x) 'double-float))
  51.       (if (> y 4.0) (go label20))
  52.       (setf dbesj0 1.0)
  53.       (if (> y xsml) (setf dbesj0 (dcsevl (- (* 0.125 y y) 1.0) bj0cs ntj0)))
  54.       (go end_label)
  55.      label20
  56.       (multiple-value-bind
  57.           (var-0 var-1 var-2)
  58.           (d9b0mp y ampl theta)
  59.         (declare (ignore var-0))
  60.         (setf ampl var-1)
  61.         (setf theta var-2))
  62.       (setf dbesj0 (* ampl (cos theta)))
  63.       (go end_label)
  64.      end_label
  65.       (return (values dbesj0 nil)))))
  66.  
  67.